$(document).ready(function(){
	var validator = $("#frmForum").validate({
		errorElement:'div',
		rules: {
			title: {
				required: true
			},
			forum_image: {
				required: true,
				accept: "jpeg|png|gif|jpg"
			}
		},
		messages: {
			title: {
				required: "Enter forum title"
			},
			forum_image: {
				required: "Select the image for forum",
				accept:"Please upload only jpeg|png|gif|jpg type of image"
			}
		}
	});
	
	var validator = $("#frmEditForum").validate({
		errorElement:'div',
		rules: {
			title: {
				required: true
			}		
		},
		messages: {
			title: {
				required: "Enter forum title"
			}		
		}
	});
	
	/* FCKEditor validation*/
	if(typeof jQuery.fn.fckEditorValidate == 'function') {
		jQuery.fn.fckEditorValidate({instanceName: 'description'});
	}
	
});